/**
 * Copyright (c) 2015-2017, Henry Yang 杨勇 (gismail@foxmail.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.lambkit.module.common.sql;

import cn.hutool.core.util.StrUtil;
import com.lambkit.db.PageData;
import com.lambkit.db.sql.Column;
import com.lambkit.db.sql.Columns;
import com.lambkit.db.sql.ConditionMode;
import com.lambkit.db.sql.Example;
import com.lambkit.module.common.row.PageTemplate;
import com.lambkit.module.common.service.PageTemplateService;

import java.io.Serializable;
import java.util.List;

/**
 * @author yangyong 
 * @website: www.lambkit.com
 * @email: gismail@foxmail.com
 * @date ${date}
 * @version 1.0
 * @since 1.0
 */

public class PageTemplateSQL extends Columns implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public static PageTemplateSQL of() {
		return new PageTemplateSQL();
	}
	
	public static PageTemplateSQL by(Column column) {
		PageTemplateSQL that = new PageTemplateSQL();
		that.add(column);
        return that;
    }

    public static PageTemplateSQL by(String name, Object value) {
        return (PageTemplateSQL) create().eq(name, value);
    }

    private String orderBy;
    
    public Example example() {
    	Example example = Example.create("lk_page_template", this);
    	if(StrUtil.isNotBlank(orderBy)) {
    		example.setOrderBy(orderBy);
    	}
    	return example;
    }

    public PageTemplateSQL orderBy(String orderBy) {
    	this.orderBy = orderBy;
    	return this;
    }

    public PageTemplate findFirst() {
        return PageTemplateService.of().dao().findFirst(example());
    }

    public List<PageTemplate> find() {
        return PageTemplateService.of().dao().find(example());
    }

    public PageData<PageTemplate> paginate(Integer pageNumber, Integer pageSize) {
        return PageTemplateService.of().dao().paginate(pageNumber, pageSize, example());
    }

    /**
     * equals
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL eq(String name, Object value) {
    	super.eq(name, value);
        return this;
    }

    /**
     * not equals !=
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL ne(String name, Object value) {
    	super.ne(name, value);
        return this;
    }


    /**
     * like
     *
     * @param name
     * @param value
     * @return
     */

    public PageTemplateSQL like(String name, Object value) {
    	super.like(name, value);
        return this;
    }
    
    public PageTemplateSQL notLike(String name, Object value) {
    	super.notLike(name, value);
        return this;
    }

    /**
     * 大于 great than
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL gt(String name, Object value) {
    	super.gt(name, value);
        return this;
    }

    /**
     * 大于等于 great or equal
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL ge(String name, Object value) {
    	super.ge(name, value);
        return this;
    }

    /**
     * 小于 less than
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL lt(String name, Object value) {
    	super.lt(name, value);
        return this;
    }

    /**
     * 小于等于 less or equal
     *
     * @param name
     * @param value
     * @return
     */
    public PageTemplateSQL le(String name, Object value) {
    	super.le(name, value);
        return this;
    }
    
    public PageTemplateSQL isnull(String name) {
    	super.isnull(name);
        return this;
    } 

    public PageTemplateSQL notNull(String name) {
    	super.notNull(name);
        return this;
    } 
    
    public PageTemplateSQL empty(String name) {
    	super.empty(name);
        return this;
    } 
    
    public PageTemplateSQL notEmpty(String name) {
    	super.notEmpty(name);
        return this;
    } 
    
    public PageTemplateSQL add(Column column) {
    	super.add(column);
    	return this;
    }
    
    /**************************/
	
	public void addCriterion(String name, Object value, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value == null) {
			 throw new RuntimeException("Value for " + property + " cannot be null");
		 }
		 add(Column.create(name, value, logic, typeHandler, valueType));
	}
   
	public void addCriterion(String name, Object value1, Object value2, ConditionMode logic, String property, String typeHandler, String valueType) {
		 if (value1 == null || value2 == null) {
			 throw new RuntimeException("Between values for " + property + " cannot be null");
		 }
		 add(Column.create(name, value1, value2, logic, typeHandler, valueType));
	}
		 
	public PageTemplateSQL andTempIdIsNull() {
		isnull("temp_id");
		return this;
	}
	
	public PageTemplateSQL andTempIdIsNotNull() {
		notNull("temp_id");
		return this;
	}
	
	public PageTemplateSQL andTempIdIsEmpty() {
		empty("temp_id");
		return this;
	}

	public PageTemplateSQL andTempIdIsNotEmpty() {
		notEmpty("temp_id");
		return this;
	}
      public PageTemplateSQL andTempIdEqualTo(Long value) {
          addCriterion("temp_id", value, ConditionMode.EQUAL, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdNotEqualTo(Long value) {
          addCriterion("temp_id", value, ConditionMode.NOT_EQUAL, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdGreaterThan(Long value) {
          addCriterion("temp_id", value, ConditionMode.GREATER_THEN, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdGreaterThanOrEqualTo(Long value) {
          addCriterion("temp_id", value, ConditionMode.GREATER_EQUAL, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdLessThan(Long value) {
          addCriterion("temp_id", value, ConditionMode.LESS_THEN, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdLessThanOrEqualTo(Long value) {
          addCriterion("temp_id", value, ConditionMode.LESS_EQUAL, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdBetween(Long value1, Long value2) {
    	  addCriterion("temp_id", value1, value2, ConditionMode.BETWEEN, "tempId", "java.lang.Long", "Float");
    	  return this;
      }

      public PageTemplateSQL andTempIdNotBetween(Long value1, Long value2) {
          addCriterion("temp_id", value1, value2, ConditionMode.NOT_BETWEEN, "tempId", "java.lang.Long", "Float");
          return this;
      }
        
      public PageTemplateSQL andTempIdIn(List<Long> values) {
          addCriterion("temp_id", values, ConditionMode.IN, "tempId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andTempIdNotIn(List<Long> values) {
          addCriterion("temp_id", values, ConditionMode.NOT_IN, "tempId", "java.lang.Long", "Float");
          return this;
      }
	public PageTemplateSQL andNameIsNull() {
		isnull("name");
		return this;
	}
	
	public PageTemplateSQL andNameIsNotNull() {
		notNull("name");
		return this;
	}
	
	public PageTemplateSQL andNameIsEmpty() {
		empty("name");
		return this;
	}

	public PageTemplateSQL andNameIsNotEmpty() {
		notEmpty("name");
		return this;
	}
       public PageTemplateSQL andNameLike(String value) {
    	   addCriterion("name", value, ConditionMode.FUZZY, "name", "java.lang.String", "Float");
    	   return this;
      }

      public PageTemplateSQL andNameNotLike(String value) {
          addCriterion("name", value, ConditionMode.NOT_FUZZY, "name", "java.lang.String", "Float");
          return this;
      }
      public PageTemplateSQL andNameEqualTo(String value) {
          addCriterion("name", value, ConditionMode.EQUAL, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameNotEqualTo(String value) {
          addCriterion("name", value, ConditionMode.NOT_EQUAL, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameGreaterThan(String value) {
          addCriterion("name", value, ConditionMode.GREATER_THEN, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameGreaterThanOrEqualTo(String value) {
          addCriterion("name", value, ConditionMode.GREATER_EQUAL, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameLessThan(String value) {
          addCriterion("name", value, ConditionMode.LESS_THEN, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameLessThanOrEqualTo(String value) {
          addCriterion("name", value, ConditionMode.LESS_EQUAL, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameBetween(String value1, String value2) {
    	  addCriterion("name", value1, value2, ConditionMode.BETWEEN, "name", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andNameNotBetween(String value1, String value2) {
          addCriterion("name", value1, value2, ConditionMode.NOT_BETWEEN, "name", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andNameIn(List<String> values) {
          addCriterion("name", values, ConditionMode.IN, "name", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andNameNotIn(List<String> values) {
          addCriterion("name", values, ConditionMode.NOT_IN, "name", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andTitleIsNull() {
		isnull("title");
		return this;
	}
	
	public PageTemplateSQL andTitleIsNotNull() {
		notNull("title");
		return this;
	}
	
	public PageTemplateSQL andTitleIsEmpty() {
		empty("title");
		return this;
	}

	public PageTemplateSQL andTitleIsNotEmpty() {
		notEmpty("title");
		return this;
	}
       public PageTemplateSQL andTitleLike(String value) {
    	   addCriterion("title", value, ConditionMode.FUZZY, "title", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andTitleNotLike(String value) {
          addCriterion("title", value, ConditionMode.NOT_FUZZY, "title", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andTitleEqualTo(String value) {
          addCriterion("title", value, ConditionMode.EQUAL, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleNotEqualTo(String value) {
          addCriterion("title", value, ConditionMode.NOT_EQUAL, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleGreaterThan(String value) {
          addCriterion("title", value, ConditionMode.GREATER_THEN, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleGreaterThanOrEqualTo(String value) {
          addCriterion("title", value, ConditionMode.GREATER_EQUAL, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleLessThan(String value) {
          addCriterion("title", value, ConditionMode.LESS_THEN, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleLessThanOrEqualTo(String value) {
          addCriterion("title", value, ConditionMode.LESS_EQUAL, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleBetween(String value1, String value2) {
    	  addCriterion("title", value1, value2, ConditionMode.BETWEEN, "title", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andTitleNotBetween(String value1, String value2) {
          addCriterion("title", value1, value2, ConditionMode.NOT_BETWEEN, "title", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andTitleIn(List<String> values) {
          addCriterion("title", values, ConditionMode.IN, "title", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTitleNotIn(List<String> values) {
          addCriterion("title", values, ConditionMode.NOT_IN, "title", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andCatalogIsNull() {
		isnull("catalog");
		return this;
	}
	
	public PageTemplateSQL andCatalogIsNotNull() {
		notNull("catalog");
		return this;
	}
	
	public PageTemplateSQL andCatalogIsEmpty() {
		empty("catalog");
		return this;
	}

	public PageTemplateSQL andCatalogIsNotEmpty() {
		notEmpty("catalog");
		return this;
	}
       public PageTemplateSQL andCatalogLike(String value) {
    	   addCriterion("catalog", value, ConditionMode.FUZZY, "catalog", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andCatalogNotLike(String value) {
          addCriterion("catalog", value, ConditionMode.NOT_FUZZY, "catalog", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andCatalogEqualTo(String value) {
          addCriterion("catalog", value, ConditionMode.EQUAL, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogNotEqualTo(String value) {
          addCriterion("catalog", value, ConditionMode.NOT_EQUAL, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogGreaterThan(String value) {
          addCriterion("catalog", value, ConditionMode.GREATER_THEN, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogGreaterThanOrEqualTo(String value) {
          addCriterion("catalog", value, ConditionMode.GREATER_EQUAL, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogLessThan(String value) {
          addCriterion("catalog", value, ConditionMode.LESS_THEN, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogLessThanOrEqualTo(String value) {
          addCriterion("catalog", value, ConditionMode.LESS_EQUAL, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogBetween(String value1, String value2) {
    	  addCriterion("catalog", value1, value2, ConditionMode.BETWEEN, "catalog", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andCatalogNotBetween(String value1, String value2) {
          addCriterion("catalog", value1, value2, ConditionMode.NOT_BETWEEN, "catalog", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andCatalogIn(List<String> values) {
          addCriterion("catalog", values, ConditionMode.IN, "catalog", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andCatalogNotIn(List<String> values) {
          addCriterion("catalog", values, ConditionMode.NOT_IN, "catalog", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andTypeIsNull() {
		isnull("type");
		return this;
	}
	
	public PageTemplateSQL andTypeIsNotNull() {
		notNull("type");
		return this;
	}
	
	public PageTemplateSQL andTypeIsEmpty() {
		empty("type");
		return this;
	}

	public PageTemplateSQL andTypeIsNotEmpty() {
		notEmpty("type");
		return this;
	}
       public PageTemplateSQL andTypeLike(String value) {
    	   addCriterion("type", value, ConditionMode.FUZZY, "type", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andTypeNotLike(String value) {
          addCriterion("type", value, ConditionMode.NOT_FUZZY, "type", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andTypeEqualTo(String value) {
          addCriterion("type", value, ConditionMode.EQUAL, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeNotEqualTo(String value) {
          addCriterion("type", value, ConditionMode.NOT_EQUAL, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeGreaterThan(String value) {
          addCriterion("type", value, ConditionMode.GREATER_THEN, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeGreaterThanOrEqualTo(String value) {
          addCriterion("type", value, ConditionMode.GREATER_EQUAL, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeLessThan(String value) {
          addCriterion("type", value, ConditionMode.LESS_THEN, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeLessThanOrEqualTo(String value) {
          addCriterion("type", value, ConditionMode.LESS_EQUAL, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeBetween(String value1, String value2) {
    	  addCriterion("type", value1, value2, ConditionMode.BETWEEN, "type", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andTypeNotBetween(String value1, String value2) {
          addCriterion("type", value1, value2, ConditionMode.NOT_BETWEEN, "type", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andTypeIn(List<String> values) {
          addCriterion("type", values, ConditionMode.IN, "type", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andTypeNotIn(List<String> values) {
          addCriterion("type", values, ConditionMode.NOT_IN, "type", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andContentIsNull() {
		isnull("content");
		return this;
	}
	
	public PageTemplateSQL andContentIsNotNull() {
		notNull("content");
		return this;
	}
	
	public PageTemplateSQL andContentIsEmpty() {
		empty("content");
		return this;
	}

	public PageTemplateSQL andContentIsNotEmpty() {
		notEmpty("content");
		return this;
	}
       public PageTemplateSQL andContentLike(String value) {
    	   addCriterion("content", value, ConditionMode.FUZZY, "content", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andContentNotLike(String value) {
          addCriterion("content", value, ConditionMode.NOT_FUZZY, "content", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andContentEqualTo(String value) {
          addCriterion("content", value, ConditionMode.EQUAL, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentNotEqualTo(String value) {
          addCriterion("content", value, ConditionMode.NOT_EQUAL, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentGreaterThan(String value) {
          addCriterion("content", value, ConditionMode.GREATER_THEN, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentGreaterThanOrEqualTo(String value) {
          addCriterion("content", value, ConditionMode.GREATER_EQUAL, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentLessThan(String value) {
          addCriterion("content", value, ConditionMode.LESS_THEN, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentLessThanOrEqualTo(String value) {
          addCriterion("content", value, ConditionMode.LESS_EQUAL, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentBetween(String value1, String value2) {
    	  addCriterion("content", value1, value2, ConditionMode.BETWEEN, "content", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andContentNotBetween(String value1, String value2) {
          addCriterion("content", value1, value2, ConditionMode.NOT_BETWEEN, "content", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andContentIn(List<String> values) {
          addCriterion("content", values, ConditionMode.IN, "content", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andContentNotIn(List<String> values) {
          addCriterion("content", values, ConditionMode.NOT_IN, "content", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andEditModeIsNull() {
		isnull("edit_mode");
		return this;
	}
	
	public PageTemplateSQL andEditModeIsNotNull() {
		notNull("edit_mode");
		return this;
	}
	
	public PageTemplateSQL andEditModeIsEmpty() {
		empty("edit_mode");
		return this;
	}

	public PageTemplateSQL andEditModeIsNotEmpty() {
		notEmpty("edit_mode");
		return this;
	}
       public PageTemplateSQL andEditModeLike(String value) {
    	   addCriterion("edit_mode", value, ConditionMode.FUZZY, "editMode", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andEditModeNotLike(String value) {
          addCriterion("edit_mode", value, ConditionMode.NOT_FUZZY, "editMode", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andEditModeEqualTo(String value) {
          addCriterion("edit_mode", value, ConditionMode.EQUAL, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeNotEqualTo(String value) {
          addCriterion("edit_mode", value, ConditionMode.NOT_EQUAL, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeGreaterThan(String value) {
          addCriterion("edit_mode", value, ConditionMode.GREATER_THEN, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeGreaterThanOrEqualTo(String value) {
          addCriterion("edit_mode", value, ConditionMode.GREATER_EQUAL, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeLessThan(String value) {
          addCriterion("edit_mode", value, ConditionMode.LESS_THEN, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeLessThanOrEqualTo(String value) {
          addCriterion("edit_mode", value, ConditionMode.LESS_EQUAL, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeBetween(String value1, String value2) {
    	  addCriterion("edit_mode", value1, value2, ConditionMode.BETWEEN, "editMode", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andEditModeNotBetween(String value1, String value2) {
          addCriterion("edit_mode", value1, value2, ConditionMode.NOT_BETWEEN, "editMode", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andEditModeIn(List<String> values) {
          addCriterion("edit_mode", values, ConditionMode.IN, "editMode", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andEditModeNotIn(List<String> values) {
          addCriterion("edit_mode", values, ConditionMode.NOT_IN, "editMode", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andDescriptionIsNull() {
		isnull("description");
		return this;
	}
	
	public PageTemplateSQL andDescriptionIsNotNull() {
		notNull("description");
		return this;
	}
	
	public PageTemplateSQL andDescriptionIsEmpty() {
		empty("description");
		return this;
	}

	public PageTemplateSQL andDescriptionIsNotEmpty() {
		notEmpty("description");
		return this;
	}
       public PageTemplateSQL andDescriptionLike(String value) {
    	   addCriterion("description", value, ConditionMode.FUZZY, "description", "java.lang.String", "String");
    	   return this;
      }

      public PageTemplateSQL andDescriptionNotLike(String value) {
          addCriterion("description", value, ConditionMode.NOT_FUZZY, "description", "java.lang.String", "String");
          return this;
      }
      public PageTemplateSQL andDescriptionEqualTo(String value) {
          addCriterion("description", value, ConditionMode.EQUAL, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionNotEqualTo(String value) {
          addCriterion("description", value, ConditionMode.NOT_EQUAL, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionGreaterThan(String value) {
          addCriterion("description", value, ConditionMode.GREATER_THEN, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionGreaterThanOrEqualTo(String value) {
          addCriterion("description", value, ConditionMode.GREATER_EQUAL, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionLessThan(String value) {
          addCriterion("description", value, ConditionMode.LESS_THEN, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionLessThanOrEqualTo(String value) {
          addCriterion("description", value, ConditionMode.LESS_EQUAL, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionBetween(String value1, String value2) {
    	  addCriterion("description", value1, value2, ConditionMode.BETWEEN, "description", "java.lang.String", "String");
    	  return this;
      }

      public PageTemplateSQL andDescriptionNotBetween(String value1, String value2) {
          addCriterion("description", value1, value2, ConditionMode.NOT_BETWEEN, "description", "java.lang.String", "String");
          return this;
      }
        
      public PageTemplateSQL andDescriptionIn(List<String> values) {
          addCriterion("description", values, ConditionMode.IN, "description", "java.lang.String", "String");
          return this;
      }

      public PageTemplateSQL andDescriptionNotIn(List<String> values) {
          addCriterion("description", values, ConditionMode.NOT_IN, "description", "java.lang.String", "String");
          return this;
      }
	public PageTemplateSQL andStatusIsNull() {
		isnull("status");
		return this;
	}
	
	public PageTemplateSQL andStatusIsNotNull() {
		notNull("status");
		return this;
	}
	
	public PageTemplateSQL andStatusIsEmpty() {
		empty("status");
		return this;
	}

	public PageTemplateSQL andStatusIsNotEmpty() {
		notEmpty("status");
		return this;
	}
      public PageTemplateSQL andStatusEqualTo(Integer value) {
          addCriterion("status", value, ConditionMode.EQUAL, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusNotEqualTo(Integer value) {
          addCriterion("status", value, ConditionMode.NOT_EQUAL, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusGreaterThan(Integer value) {
          addCriterion("status", value, ConditionMode.GREATER_THEN, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusGreaterThanOrEqualTo(Integer value) {
          addCriterion("status", value, ConditionMode.GREATER_EQUAL, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusLessThan(Integer value) {
          addCriterion("status", value, ConditionMode.LESS_THEN, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusLessThanOrEqualTo(Integer value) {
          addCriterion("status", value, ConditionMode.LESS_EQUAL, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusBetween(Integer value1, Integer value2) {
    	  addCriterion("status", value1, value2, ConditionMode.BETWEEN, "status", "java.lang.Integer", "Float");
    	  return this;
      }

      public PageTemplateSQL andStatusNotBetween(Integer value1, Integer value2) {
          addCriterion("status", value1, value2, ConditionMode.NOT_BETWEEN, "status", "java.lang.Integer", "Float");
          return this;
      }
        
      public PageTemplateSQL andStatusIn(List<Integer> values) {
          addCriterion("status", values, ConditionMode.IN, "status", "java.lang.Integer", "Float");
          return this;
      }

      public PageTemplateSQL andStatusNotIn(List<Integer> values) {
          addCriterion("status", values, ConditionMode.NOT_IN, "status", "java.lang.Integer", "Float");
          return this;
      }
	public PageTemplateSQL andUpdateTimeIsNull() {
		isnull("update_time");
		return this;
	}
	
	public PageTemplateSQL andUpdateTimeIsNotNull() {
		notNull("update_time");
		return this;
	}
	
	public PageTemplateSQL andUpdateTimeIsEmpty() {
		empty("update_time");
		return this;
	}

	public PageTemplateSQL andUpdateTimeIsNotEmpty() {
		notEmpty("update_time");
		return this;
	}
      public PageTemplateSQL andUpdateTimeEqualTo(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.EQUAL, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeNotEqualTo(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.NOT_EQUAL, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeGreaterThan(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.GREATER_THEN, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeGreaterThanOrEqualTo(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.GREATER_EQUAL, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeLessThan(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.LESS_THEN, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeLessThanOrEqualTo(java.util.Date value) {
          addCriterion("update_time", value, ConditionMode.LESS_EQUAL, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeBetween(java.util.Date value1, java.util.Date value2) {
    	  addCriterion("update_time", value1, value2, ConditionMode.BETWEEN, "updateTime", "java.util.Date", "String");
    	  return this;
      }

      public PageTemplateSQL andUpdateTimeNotBetween(java.util.Date value1, java.util.Date value2) {
          addCriterion("update_time", value1, value2, ConditionMode.NOT_BETWEEN, "updateTime", "java.util.Date", "String");
          return this;
      }
        
      public PageTemplateSQL andUpdateTimeIn(List<java.util.Date> values) {
          addCriterion("update_time", values, ConditionMode.IN, "updateTime", "java.util.Date", "String");
          return this;
      }

      public PageTemplateSQL andUpdateTimeNotIn(List<java.util.Date> values) {
          addCriterion("update_time", values, ConditionMode.NOT_IN, "updateTime", "java.util.Date", "String");
          return this;
      }
	public PageTemplateSQL andUserIdIsNull() {
		isnull("user_id");
		return this;
	}
	
	public PageTemplateSQL andUserIdIsNotNull() {
		notNull("user_id");
		return this;
	}
	
	public PageTemplateSQL andUserIdIsEmpty() {
		empty("user_id");
		return this;
	}

	public PageTemplateSQL andUserIdIsNotEmpty() {
		notEmpty("user_id");
		return this;
	}
      public PageTemplateSQL andUserIdEqualTo(Long value) {
          addCriterion("user_id", value, ConditionMode.EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdNotEqualTo(Long value) {
          addCriterion("user_id", value, ConditionMode.NOT_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdGreaterThan(Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdGreaterThanOrEqualTo(Long value) {
          addCriterion("user_id", value, ConditionMode.GREATER_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdLessThan(Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_THEN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdLessThanOrEqualTo(Long value) {
          addCriterion("user_id", value, ConditionMode.LESS_EQUAL, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdBetween(Long value1, Long value2) {
    	  addCriterion("user_id", value1, value2, ConditionMode.BETWEEN, "userId", "java.lang.Long", "Float");
    	  return this;
      }

      public PageTemplateSQL andUserIdNotBetween(Long value1, Long value2) {
          addCriterion("user_id", value1, value2, ConditionMode.NOT_BETWEEN, "userId", "java.lang.Long", "Float");
          return this;
      }
        
      public PageTemplateSQL andUserIdIn(List<Long> values) {
          addCriterion("user_id", values, ConditionMode.IN, "userId", "java.lang.Long", "Float");
          return this;
      }

      public PageTemplateSQL andUserIdNotIn(List<Long> values) {
          addCriterion("user_id", values, ConditionMode.NOT_IN, "userId", "java.lang.Long", "Float");
          return this;
      }
}